package com.hxzy.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hxzy.shop.dto.auth.req.MerchantListReq;
import com.hxzy.shop.dto.auth.resp.MerchantListResp;
import com.hxzy.shop.dto.auth.resp.MerchantResp;
import com.hxzy.shop.entity.Merchant;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 商户管理表
 * @Description TODO
 * @Date 2023/5/6 16:57
 * @Version 1.0
 */
public interface MerchantMapper  extends BaseMapper<Merchant> {

    /**
     * 商户分页查询
     * @param req
     * @return
     */
    List<MerchantListResp> selectAllMerchant(@Param(value = "dto") MerchantListReq req);


    /**
     * 获取商户详情
     * @param merchantId
     * @return
     */
    MerchantResp findMerchantDetail(long merchantId);

    /**
     * 商户门店数量限制
     * @param id
     * @return
     */
    Integer selectStoreCount(@Param("id") Long id);
}
